x86: properly handle LOCK prefix in privileged PV opcode emulation
- include LOCK prefix presence in calculation of which CR/DR is being
targeted by moves to/from these registers
- fail any other opcodes when beingused with lock prefix
While, as discussed, the performance impact of this option is
certainly higher than on native Linux, the option should not be
entirely disallowed if people want to sacrifice performance for less
lowmem pressure.
[XEN] Consistent assumption that PTEs contain MFNs in both ptwr
page-fault handler and ptwr emulation handler. Signed-off-by: Keir Fraser <keir@xensource.com>
x64 SMP Vista HVM guest uses HPET as the main system timer, and it
uses physical destination mode with broadcast to deliver the interrupts
generated by HPET. In current code, timer interrupts are injected only
to VCPU0 in vioapic.c, but this doesn't satisfy x64 SMP Vista -- when
it boots, it complains "a clock interrupt was not received on a
secondary processor within the allocated time interval" with Bug Check
0x101.
Ewan Mellor [Thu, 11 Jan 2007 19:00:35 +0000 (19:00 +0000)]
This patch does the following:
- renames the XenManagedDomain.py file to XenAPIDomain.py, since this
name better reflects its functionality/purpose
- adds domain tracking to the XenAPIDomain class so that xend-managed
domains can be deleted in an 'atexit' handler upon test case termination
- adds one basic xapi-related test which is part of the grouptests
'xapi'
- refactors the vtpm-related test using xen-api and adds it to the
grouptest 'xapi'
- adds documentation to the README for how to configure xm and xend to
use XML-RPC or Xen-API for communication
Ewan Mellor [Thu, 11 Jan 2007 18:56:59 +0000 (18:56 +0000)]
I added a parameter '-md' to 'runtest.sh' for running the xm test suite
in a mode where all created domains a created as xend-managed domains.
This patch also fixes a problem related to calling 'xm domid' on a
currently suspended domain if that domain is a managed domain. In that
case a 'None' is returned by Xend, which I default to '-1'.
Use strstr() to look for "bimodal" string in ELF notes, to allow guests to use
"yes,bimodal", so they are correctly identified as PAE on older hypervisors.
[XEN] More emulator fixes:
1. Emulate LAHF/SAHF instructions
2. #GP if instruction is longer than 15 bytes
3. Accept any number of prefix bytes (up to
15-byte total instruction length)
4. Repeated addr/data-size overrides are sticky
rather than toggling.
Ian Campbell [Wed, 10 Jan 2007 09:39:24 +0000 (09:39 +0000)]
[PATCH] kexec/kdump: remove unnecessary incusion of asm/fixmap.h
I think this a legacy of an older revision of this code,
but asm/fixmap.h does not seem to be needed in
asm-x86/x86_32/kexec.h or asm-x86/x86_64/kexec.h
That is, neither of these incarntations of kexec.h seem
to do anything related to fixmap directly or indirectly.
Ewan Mellor [Tue, 9 Jan 2007 17:25:28 +0000 (17:25 +0000)]
This simple patch allows domains created in the xm-test suite to be
created as managed domains using either a parameter to the
XenTestDomain() constructor or by setting the environment variable
XM_MANAGED_DOMAINS and running the tests with it.
[XEN] Emulate DAA/DAS the hard way. We cannot execute the instruction
directly within the emulator as it is unavailable if the emulator runs
in x86/64 mode. Signed-off-by: Keir Fraser <keir@xensource.com>
Tim Deegan [Tue, 9 Jan 2007 16:49:16 +0000 (16:49 +0000)]
[HVM] Remove unnecessary write barriers
Using a volatile pointer saves us from the compier reordering these
writes, and the processor won't let them appear out of order. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Tim Deegan [Tue, 9 Jan 2007 13:24:45 +0000 (13:24 +0000)]
When booting via xm, only run the bootloader if it's in non-interactive mode:
otherwise we lose the user's named kernel and try to bootload the temporary
file pygrub returned.
Tim Deegan [Tue, 9 Jan 2007 13:24:40 +0000 (13:24 +0000)]
Pass in kernel/ramdisk settings to pygrub; if specified, don't try to use
grub.conf; this allows hands-off bootloading in the absence of a grub.conf.
It's also useful for specifying temporary changes etc.
Tim Deegan [Mon, 8 Jan 2007 14:24:30 +0000 (14:24 +0000)]
[HVM] Add expansion-ROM boot support again.
Boot info now stored at 0x9ff00; registers saved in HDD load code. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
[linux build] Build Linux kernels with output files in a separate directory.
Use a single source tree (linux-2.6-xen) and use Linux' O= option to
make the build put output files in a
build-linux-$(LINUX_VER)-$(EXTRAVERSION)_$(XEN_TARGET_ARCH) directory,
making it possible to build both x86_32 and x86_64 kernels in the same
tree.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
[TOOLS] Improve information displayed by the xm sched-credit command.
The improvement is as follows.
1. The display form is changed like the xm sched-sedf command.
2. When -d option is omitted, information on all domains is
displayed.
Examples:
# xm sched-credit -d vm1
Name ID Weight Cap
vm1 1 512 100
# xm sched-credit
Name ID Weight Cap
Domain-0 0 256 0
vm1 1 512 100
vm2 2 512 50
Enable compatibility mode operation for HYPERVISOR_domctl. Also add logic
to switch a domain to/from compatibility mode (supposed to happen early
after domain creation only).
Enable compatibility mode operation for HYPERVISOR_memory_op,
HYPERVISOR_update_descriptor, HYPERVISOR_update_va_mapping. This also
introduces infrastructure to do argument translation.
Adjust emulation code to deal with compatibility mode guests. This
includes enhancements to emulate_privileged_op() that aren't directly
related to such guests.
Handle the creation of startup info for compatibility mode guests. This
includes a script to auto-generate checking or translation code between
native and compatibility mode hypercall argument structures.
Add logic to generate headers reflecting the compatibility mode layout
of hypercall arguments. Provide infrastructure for accessing handles
passed from compatibility mode guests. Vector those hypercalls not
needing any translation to their native implementations.